package com.xpffly.design.facade.service;

/**
 * @Author: 午夜学徒
 * @Date: 2022/4/4 20:17
 * @Description：门面对象
 */
public class Facade {
    // 被委托的对象
    private SubServiceA subServiceA = new SubServiceA();
    private SubServiceB subServiceB = new SubServiceB();
    private SubServiceC subServiceC = new SubServiceC();

    // 封装供外部访问子服务的方法
    public void methodA() {
        subServiceA.doSomethingA();
    }

    public void methodB() {
        subServiceB.doSomethingB();
    }

    public void methodC() {
        subServiceC.doSomethingC();
    }
}
